1. Field of the Invention
The invention relates to an oscillator circuit, particularly to an oscillator circuit generating an oscillation output by charging and discharging a capacitor.
2. Description of the Related Art
Generally, an oscillator circuit is incorporated in a semiconductor integrated circuit such as a microcomputer in order to generate an operation clock. Hereafter, a conventional oscillator circuit will be described. FIG. 5 is a circuit diagram of the oscillator circuit.
This oscillator circuit includes a capacitor C, a Schmidt inverter STV detecting a voltage of a node N of the capacitor C, a P-channel type MOS transistor M1 and an N-channel type MOS transistor M2 where an output of the Schmidt inverter STV is inputted to respective gates through an inverter INV, a P-channel type MOS transistor M3 serially connected with the P-channel type MOS transistor M1 and flowing a reference current I1, and an N-channel type MOS transistor M4 serially connected with the N-channel type MOS transistor M2 and flowing a reference current I1. An output clock of the oscillator circuit is obtained from the inverter INV.
FIG. 6 is a circuit diagram showing a reference current circuit generating the above-mentioned reference current I1. A resistor R1 (a resistance value R1) and an N-channel type MOS transistor M5 are serially connected between a power supply terminal supplying a power supply voltage Vdd and a ground terminal supplying a ground voltage GND. In the N-channel type MOS transistor M5, a gate and a drain are commonly connected and a source is grounded. When a voltage between the gate and the source is Vgs1, the reference current I1 flows through the N-channel type MOS transistor M5. The reference current I1 is given by the equation 1.
                              I          ⁢                                          ⁢          1                =                              Vdd            -                          Vgs              ⁢                                                          ⁢              1                                            R            ⁢                                                  ⁢            1                                              [                  Equation          ⁢                                          ⁢          1                ]            
This reference current I1 flows through an N-channel type MOS transistor M6 of a current mirror. The reference current I1 also flows through a P-channel type MOS transistor M7 serially connected with the N-channel type MOS transistor M6.
A gate voltage Va of the P-channel type MOS transistor M7 is applied to a gate of the P-channel type MOS transistor M3 in FIG. 5, and a gate voltage Vb of the N-channel type MOS transistor M6 is applied to a gate of the N-channel type MOS transistor M4 in FIG. 5.
The operation of this oscillator circuit will be described referring to a waveform diagram in FIG. 7. It is assumed that the Schmidt inverter STV has two thresholds Vt1 and Vt2 (Vt1>Vt2). When the voltage of the node N (a terminal of the capacitor C) is increased and reaches the threshold Vt1 of the Schmidt inverter STV by charging the capacitor C by the reference current I1, an output of the Schmidt inverter STV is inverted to the low level, an output of the inverter INV turns to the high level, and correspondingly M2 turns on and M1 turns off. The voltage of the node N of the capacitor C is then decreased by discharging the capacitor C by the reference current I1, and when the voltage reaches the threshold Vt2 of the Schmidt inverter STV, the output of the Schmidt inverter STV is inverted to the high level, the output of the inverter INV turns to the low level, and correspondingly M2 turns off and M1 turns on. Then, the charging of the capacitor C by the reference current I1 is started again. By repeating the charge and the discharge in this manner, the output clock is obtained from the inverter INV. The relevant technology is described in the Japanese Patent Application Publication No. 2003-69341.
It is preferable that the oscillation frequency of the oscillator circuit incorporated in the semiconductor integrated circuit does not change even when the power supply voltage Vdd applied to the semiconductor integrated circuit changes due to deterioration of a battery or the like. However, the conventional oscillator circuit has a problem of high dependence of the oscillation frequency on the power supply voltage.